                            <? 
                                $frmtime = time();
                            ?>
                            <div class="main">
                                <h3 class="title"><?=$clabel?> &raquo; <?=$mlabel?></h3>
                                <div class="formdiv special">
                                    <form method="POST" id="frmMiscFee<?=$frmtime?>">
                                        <table>
                                            <? if( isset($errors) ) {
                                               foreach($errors as $error) {
                                               ?>rm
                                            <tr>
                                                <td class="errormsg" colspan="3">
                                                    <?=$error?>    
                                                </td>
                                            </tr>   
                                               <? 
                                               } 
                                            }  ?>
                                            <? if( isset($successes) ) {
                                               foreach($successes as $success) {
                                               ?>
                                            <tr>
                                                <td class="successmsg" colspan="3">
                                                    <?=$success?>    
                                                </td>
                                            </tr>   
                                               <? 
                                               } 
                                            }  ?>
                                            <tr>
                                                <td colspan="3">
                                                    <table width="100%">
                                            			<tr  class="h0">
                                            				<td>Item Name</td>
                                                            <td>Fee (QAR)</td>                                          				
                                            			</tr>
                                                        <?
                                                        foreach($misclist as $fee) {
                                                        ?>
                                                        <tr>
                                                            <td class="h0"><?=$fee['feetype_label']?></td>
                                                            <td>
                                                                <input class="stext rht-ali required number" name="miscfee_<?=$fee['feetype_id']?>" value="<?=$fee['feetype_fee']?>" />
                                                            </td>
                                                        </tr>
                                                        <?
                                                        }
                                                        ?>
                                                    </table>
                                                </td>
                                            </tr>
                                        	<tr>
                                        		<td></td>
                                        		<td colspan="2">
                                                    <input class="button" type="submit" name="btnMiscFee" value="Save" id="btnMiscFee" />
                                                    <input class="button" type="reset" value="Cancel" id="btnreset" />
                                                </td>
                                        	</tr>
                                        </table>
                                	</form>
                                    <script language="javascript" type="text/javascript">
                                        if(typeof jQuery == 'undefined') {
                                            alert('Invalid Request');
                                            window.location = "/";
                                        }
                                        $(document).ready( function() {
                                            $("#frmMiscFee<?=$frmtime?>").validate({
                                                errorPlacement: function(error, element) {
                                                    //placeError(error, element);
                                                },
                                                submitHandler: function(form) {
                                                    var cui = $('#contenttabs .ui-tabs-panel:visible');                                                                                                        
                                               	    var jqxhr = $.post(
                                                        "/fees/miscfee", 
                                                        $("#frmMiscFee<?=$frmtime?>").serialize(), 
                                                        function (data) {
                                                            $(cui).html(data);
                                                        }
                                                    );
                                                    $(cui).html('<div id="loadingdiv"><div class="centerdiv"><strong>Processing</strong><br/><img src="/images/ajaxloader.gif" /></div></div>');
                                                }
                                            });
            
                                            $("#frmAddFeeType input[type='reset']").click( function() {
                                                $('#frmAddFeeType label.error').remove();
                                            });
                                            
                                            
                                        });
                                    </script>
                                 </div>
                            </div>